﻿    using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DelonixRegiaHMSys.Core.Services;
using DelonixRegiaHMSys.Infrastructure.Data;

namespace DelonixRegiaHMSys.UI.WebForms
{
    public partial class ExistingGuestOrNot : System.Web.UI.Page
    {
        string userID;
        protected void Page_Load(object sender, EventArgs e)
        {
            userID = Request.QueryString["UserID"];
        }

        protected void legbtn_Click(object sender, EventArgs e)
        {
            if (tbxGuestID.Text == null)
            {
            }
            else
            {
                var gpservice = new gpServices(new EfGuestParticularQuery());
                bool a = gpservice.GuestExist(tbxGuestID.Text);
                if (a == true)
                {
                    string querystring = "UserID=" + userID + "&GuestID=" + tbxGuestID.Text;
                    Server.Transfer("~/WebForms/RRandCIModule/RoomReservationManagement.aspx?" + querystring);
                }
                else
                {
                    Label1.Text = "Guest does not exist!";
                }
                
            }
        }

        protected void lnebtn_Click(object sender, EventArgs e)
        {
            Server.Transfer("~/WebForms/RRandCIModule/AddGuestParticular.aspx?UserID=" + userID);
        }
    }
}